home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / asm_subr.arc / STDMESSO < prev    next >
Encoding:
Text File  |  1985-09-24  |  1.1 KB  |  34 lines

  1. ;-------------------------routine begins--------------------------+
  2. ; ROUTINE TO SEND MESSAGE TO STANDARD OUTPUT
  3. ;
  4. ; FUNCTION: This routine sends a message out through the standard
  5. ;           output device
  6. ; INPUT:  Upon input DS:SI points to the message.  The message ter-
  7. ;         minates with an ASCII zero.
  8. ; OUTPUT: The individual characters of the message are output
  9. ;         through the standard output device.
  10. ; REGISTERS USED:  No registers are modified.  SI is used to
  11. ;                  point to the input.
  12. ; SEGMENTS REFERENCED: The data segment must contain the message.
  13. ; ROUTINES CALLED: stdout
  14. ; SPECIAL NOTES: None
  15. ;
  16. stdmessout    proc    far
  17.     push    si        ; save registers
  18.     push    ax
  19. ;
  20. stdmessout1:
  21.     mov    al,[si]        ; get byte
  22.     inc    si        ; point to next byte
  23.     cmp    al,0        ; done ?
  24.     je    stdmessoutexit    ; if so, exit.
  25.     call    stdout        ; send it out
  26.     jmp    stdmessout1    ; loop for more
  27. ;
  28. stdmessoutexit:
  29.     pop    ax        ; restore registers
  30.     pop    si
  31.     ret
  32. stdmessout    endp
  33. ;-------------------------routine ends---------------------------+
  34.